
public class Rectangle {
	private float length = 1;
	private float width = 1;
	public Rectangle(){
		
	}
	public Rectangle(float length,float width){
		if(length>0){
		this.length=length;}
		if(width>0){
		this.width=width;}
	}
	public float getLength(){
		return length;
	}
	public void setlength(float length){
		if(length>0){
		this.length=length;}
	}
	public float getWidth(){
		return width;
	}
	public void setWidth(float width){
		if(width>0){
		this.width=width;}
	}
	public double getArea(){
		
		return length*width;
	
		
	}
	public double getPerimeter(){
		return 2*(length+width);
	}
	public String toString(){
		return "Rectangle[length="+length+",width="+width;
	}
}
